Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Default User Shell when executing Commands #131

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

brand-it
Copy link

I was playing around with this extension, and for the most part, it works great. However, I ran into one issue: it did not use my default shell defined within the command line. This is a problem as I have some environment variables and path info that are not generally accessible to my other bash shells. This resulted in many please set RAILS_MASTER_KEY errors, which are easy to fix. However, it would not be nice to use my default shell when it detected it or others' default shells as this could save a lot of pain with differences in pathing info.

This concept was pulled from Ruby LSP so can't take credit for the code.

[2023-12-19 22:54:55.246] [INFO] Running dry-run of RSpec test suite with the following command: /opt/homebrew/bin/fish -ic "bundle exec rspec --pattern './spec//**{,/*/**}/*_test.rb,./spec//**{,/*/**}/test_*.rb,./spec//**{,/*/**}/*_spec.rb'       --require /Users/brandit/apps/vscode-ruby-test-adapter/custom_formatter.rb       --format CustomFormatter       --order defined       --dry-run"

Above is the output it generates when I change the default shell to fishshell. This also works for zsh and bash.

Some screenshots showing it working for rspec.
Screenshot 2023-12-19 at 3 19 34 PM

[2023-12-19 23:18:49.077] [INFO] Running command: /opt/homebrew/bin/fish -ic "bundle exec rspec --require /Users/brandit/apps/vscode-ruby-test-adapter/custom_formatter.rb --format CustomFormatter '/Users/brandit/apps/test/spec/testing_spec.rb:10'"

src/rspecTests.ts Outdated Show resolved Hide resolved
src/tests.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant